Declarations of external variables and functions within a block apply only to the block containing the declaration (in some C compilers, such declarations affect the whole file). ANSI C states that external declarations should obey normal scoping rules. For example:
{
{
extern int a;
a = 0;
}
a = 1; /* Illegal */
}
You can use the -traditional option if you want all extern declarations to be treated as global.